/*
 * Copyright (c) 2008 Anshuman Manur <anshuman.manur@gmail.com>,
 * Lavanya Shastri <lavanya.shastri@gmail.com>
 * 
 * This file is part of Andronova.
 * 
 * Andronova is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 * 
 * Andronova is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *  
 * You should have received a copy of the GNU General Public License
 * along with Andronova.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * This file may use the functionality provided by the library
 * jid3lib version 0.5.4 (<http://sourceforge.net/projects/javamusictag/>).
 * jid3lib and its uses are covered by GNU Lesser General Public License.
 * 
 */

package com.googlecode.andronova.helper;

import java.io.File;
import java.io.IOException;

import org.farng.mp3.MP3File;
import org.farng.mp3.TagException;

public class Song extends MP3File {
	
	private long libId;
	private long playListId;
		
	public Song(File f) throws IOException, TagException {
		super(f);		
	}
	
	public Song(String fileName) throws IOException, TagException {
		super(fileName);
	}
	
	public Song(String fileName, long LibId) throws IOException, TagException {
		this(fileName);
		libId = LibId;
	}
	
	public Song(File f, long LibId) throws IOException, TagException {
		this(f);
		libId = LibId;
	}
	
	public Song(Song copyObject) {
		super(copyObject);
		libId = copyObject.libId;
		playListId = copyObject.playListId;
	}
	
	public long getLibId() {
		return libId;
	}
	
	public long getPlayListId() {
		return playListId;
	}
	
	public void setPlayListId(long id) {
		playListId = id;
	}
	
	public void setLibId(long id) {
		libId = id;
	}

	@Override
	public boolean equals(Object o) {
		Song s = (Song) o;
		if(s.getLibId() == libId)
			return true;
		return false;
	}	
}
